<?php

$params = array_merge(
        require(__DIR__ . '/../../common/config/params.php'), require(__DIR__ . '/../../common/config/params-local.php'), require(__DIR__ . '/params.php'), require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'app-frontend',
    'basePath' => dirname(__DIR__),
    'bootstrap' => ['log'],
    'controllerNamespace' => 'frontend\controllers',
    'components' => [
        'user' => [
            'identityClass' => 'common\models\User',
            'enableAutoLogin' => true,
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                    [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
            ],
        ],
    ],
    'modules' => [
        'gii' => [
            'class' => 'yii\gii\Module',
            'allowedIPs' => ['127.0.0.1', '::1'],
            'generators' => [
                'crud' => [//生成器名称 
                    'class' => 'yii\gii\generators\crud\Generator',
                    'templates' => [//设置我们自己的模板 
                        //模板名 => 模板路径 
                        'myCrud' => '@app/giitemplate/crud/default',
                    ]
                ],
                'model' => [//生成器名称 
                    'class' => 'yii\gii\generators\model\Generator',
                    'templates' => [//设置我们自己的模板 
                        //模板名 => 模板路径 
                        'myModel' => '@app/giitemplate/model/default',
                    ]
                ]
            ],
        ],
    ],
    'params' => $params,
    'name'=>'桂智商城',
];
